package cn.jjaw.command.note.command;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class StaticMethodCommand extends MethodCommand{

    public StaticMethodCommand(String[] reg, Method commandMethod) {
        super(reg, commandMethod);
    }

    @Override
    public Object execute(String[] command) {
        try {
            return invoke(command,null);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
}
